using System;
using System.Collections.Generic;
using System.Text;

namespace zeroflag.Parserz
{
	public class Character : Token
	{
		public Character()
		{
		}

		public Character(char c)
			: this()
		{
			this.Value = c;
		}

		private char m_Value;

		public char Value
		{
			get { return m_Value; }
			set { m_Value = value; }
		}

		/// <returns>A <see cref="T:System.String"></see> that represents the current <see cref="T:System.Object"></see>.</returns>
		public override string ToString()
		{
			return this.Value.ToString();
		}

		public StringBuilder ToString(StringBuilder builder)
		{
			builder.Append(this.Value);
			foreach (Character c in this.Next)
			{
				if (c != null)
					c.ToString(builder);
			}
			return builder;
		}
	}
}
